document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    // when all is done, execute bootstrap angular application
    angular.bootstrap(document, ['myApp']);
}


/**
 * windows phone fixes
 */
if(typeof window.console === "undefined")
{
	window.console = {
        log : function(str){ 
            window.external.Notify(str);
        }
    };
}
window.onerror=function(e, url, lineNumber)
{
	console.log("ERROR! : " +url + "(" + lineNumber + ") : " + JSON.stringify(e));
};
console.log("Installed console ! ");